import request from '@/request';
import type {editFormData , addFormData} from '../@types/index';

/**获取前台nav列表*/
export const getNav = (params: { title ?: string , isAll ?: boolean , isParent ?: boolean , isAdd ?: boolean }) => {
    return request({
        url: '/api/v2/admin/getNav',
        method: 'get',
        params
    })
} 

/**添加前台nav*/
export const addNav = (data: addFormData ) => request({
    url: '/api/v2/admin/addNav',
    method: 'post',
    data
}) 

/**删除前台nav*/
export const delNav = (data: { ID: string }) => request({
    url: '/api/v2/admin/delNav',
    method: 'post',
    data
})

/**更新前台nav*/
export const updataNav = (data: editFormData) => request({
    url: '/api/v2/admin/updataNav',
    method: 'post',
    data
})